package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysOrganizationMapper;
import com.ruoyi.system.domain.SysOrganization;
import com.ruoyi.system.service.ISysOrganizationService;

/**
 * 组织Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-04
 */
@Service
public class SysOrganizationServiceImpl implements ISysOrganizationService 
{
    @Autowired
    private SysOrganizationMapper sysOrganizationMapper;

    /**
     * 查询组织
     * 
     * @param id 组织主键
     * @return 组织
     */
    @Override
    public SysOrganization selectSysOrganizationById(Long id)
    {
        return sysOrganizationMapper.selectSysOrganizationById(id);
    }

    /**
     * 查询组织列表
     * 
     * @param sysOrganization 组织
     * @return 组织
     */
    @Override
    public List<SysOrganization> selectSysOrganizationList(SysOrganization sysOrganization)
    {
        return sysOrganizationMapper.selectSysOrganizationList(sysOrganization);
    }

    /**
     * 新增组织
     * 
     * @param sysOrganization 组织
     * @return 结果
     */
    @Override
    public int insertSysOrganization(SysOrganization sysOrganization)
    {
        return sysOrganizationMapper.insertSysOrganization(sysOrganization);
    }

    /**
     * 修改组织
     * 
     * @param sysOrganization 组织
     * @return 结果
     */
    @Override
    public int updateSysOrganization(SysOrganization sysOrganization)
    {
        return sysOrganizationMapper.updateSysOrganization(sysOrganization);
    }

    /**
     * 批量删除组织
     * 
     * @param ids 需要删除的组织主键
     * @return 结果
     */
    @Override
    public int deleteSysOrganizationByIds(Long[] ids)
    {
        return sysOrganizationMapper.deleteSysOrganizationByIds(ids);
    }

    /**
     * 删除组织信息
     * 
     * @param id 组织主键
     * @return 结果
     */
    @Override
    public int deleteSysOrganizationById(Long id)
    {
        return sysOrganizationMapper.deleteSysOrganizationById(id);
    }

    @Override
    public List<SysOrganization> selectAll() {
        SysOrganization queryModel=new SysOrganization();
        return sysOrganizationMapper.selectSysOrganizationList(queryModel);
    }
}
